import org.w3c.dom.ls.LSOutput;

import java.nio.channels.ScatteringByteChannel;
import java.sql.SQLOutput;
import java.util.Scanner;

public class java20231220 {
    public static void main1(String[] args) {
       /* byte a=10;
        System.out.println(a);

        //Byte型变量所能表示的范围
        System.out.println(Byte.MAX_VALUE);
        System.out.println(Byte.MIN_VALUE);*/


        /*double a = 3.14;
        System.out.println(a);

        int b = 1;
        int c = 2;
        System.out.println(b/c);*/


       /* float num = 1.0f; // 写作 1.0F 也可以
        System.out.println(num);*/

        /*char c1 = 'A'; // 大写字母
        char c2 = '1'; // 数字字符
        System.out.println(c1);
        System.out.println(c2);
        // 注意：java中的字符可以存放整形
        char c3 = '帅';
        System.out.println(c3);*/



       /* boolean b = true;
        System.out.println(b);
        b = false;
        System.out.println(b);*/

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        double sum = 0.0;
        for (int i = 1; i <=n; i++) {
            if(i % 2 == 0)
            {
                sum -=1.0/i;
            }else{
                sum +=1.0/i;
            }
        }
        System.out.printf("%.3f",sum);
    }
    public static int sum(int n) {
        if (n == 1) {
            return 1;
        }
          return n+sum(n-1);
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int ret = sum(x);
        System.out.println(ret);
    }


}
